package com.hfjc.websocket;

import java.io.IOException;

import javax.websocket.OnOpen;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint;

@ServerEndpoint("/hello")
public class Hello {

	@OnOpen
	public void sayHello(Session session) throws IOException{
		System.out.println("收到客户端请求！");
		session.getBasicRemote().sendText("HelloWorld!");
	}
}
